﻿using DAL;
using IService;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Service
{
    public class OmSalesOrderDetailService : IOmSalesOrderDetailService
    {
        private readonly OmSalesOrderDetailDal dal;
        public OmSalesOrderDetailService(OmSalesOrderDetailDal dal)
        {
            this.dal = dal;
        }

        public Task<int> CreateAsync(OmSalesOrderDetail data)
        {
            return this.dal.CreateAsync(data);
        }

        public Task<int> DeleteAsync(long Id)
        {
            return this.dal.DeleteAsync(Id);
        }

        public Task<List<OmSalesOrderDetail>> GetAllAsync()
        {
            return this.dal.GetAllAsync();
        }

        public Task<OmSalesOrderDetail> GetByIdAsync(long Id)
        {
            return this.dal.GetByIdAsync(Id);
        }

        public Task<int> UpdateAsync(OmSalesOrderDetail date)
        {
            return this.dal.UpdateAsync(date);
        }
    }
}
